/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.nurdrobotics;

import edu.wpi.first.wpilibj.DriverStation;

/**
 *
 * @author hpadmin
 */
public class ForkliftStick extends NURDJoystick {

    public ForkliftStick() {
        super(1);
    }

    public double getVelocity(){
        double joy = -getRawAxis(2);
        return joy;
    }

    /**
     * returns trim
     * @return value between 0 and 1
     */
    public double getTrim() {
        // get value from joystick converted to 0 -> 1
        double trim = ((-getRawAxis(3)) + 1) * 0.5;

        // get trimScale from analog slider in driver station and convert to 0 -> 1
        //double trimScale = DriverStation.getInstance().getAnalogIn(1) / 5.0;
        double trimScale = 0.2;

        // apply trim scale factor
        trim *= trimScale;

        return trim;
    }

}

